home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / pcpilot.arc / SCR.ARC / KBD.ASM < prev    next >
Assembly Source File  |  1990-01-14  |  2KB  |  126 lines

  1. ; KBD.ASM - Compiled from KBD.C using TCC.EXE
  2. ;
  3. ; From the book "Systems Programming in Turbo C", by Michael J. Young
  4. ;
  5.  
  6.     ifndef    ??version
  7. ?debug    macro
  8.     endm
  9.     endif
  10.     ?debug    S "kbd.c"
  11. _TEXT    segment    byte public 'CODE'
  12. DGROUP    group    _DATA,_BSS
  13.     assume    cs:_TEXT,ds:DGROUP,ss:DGROUP
  14. _TEXT    ends
  15. _DATA    segment word public 'DATA'
  16. d@    label    byte
  17. d@w    label    word
  18. _DATA    ends
  19. _BSS    segment word public 'BSS'
  20. b@    label    byte
  21. b@w    label    word
  22.     ?debug    C E9E69A5212056B62642E63
  23.     ?debug    C E900101D1110423A5C494E434C5544455C646F732E68
  24.     ?debug    C E94CB2511210423A5C494E434C5544455C6B62642E68
  25. _BSS    ends
  26. _TEXT    segment    byte public 'CODE'
  27.     ?debug    C E800056B62642E63E69A5212
  28.     ?debug    L 13
  29. _KbdFlush    proc    near
  30.     ?debug    B
  31.     ?debug    B
  32. @2:
  33.     ?debug    L 19
  34.         mov        ah, 01
  35.     ?debug    L 20
  36.      int     16h
  37.     ?debug    L 21
  38.      jz     @3
  39.     ?debug    L 23
  40.      mov     ah, 00
  41.     ?debug    L 24
  42.      int     16h
  43.     ?debug    L 26
  44.      jmp     @2
  45. @3:
  46. @1:
  47.     ?debug    L 28
  48.     ret    
  49.     ?debug    E
  50.     ?debug    E
  51. _KbdFlush    endp
  52.     ?debug    L 31
  53. _KbdGetShift    proc    near
  54.     ?debug    B
  55.     ?debug    B
  56.     ?debug    L 36
  57.     mov    bx,64
  58.     mov    es,bx
  59.     mov    bx,23
  60.     mov    ax,word ptr es:[bx]
  61.     jmp    short @4
  62. @4:
  63.     ?debug    L 37
  64.     ret    
  65.     ?debug    E
  66.     ?debug    E
  67. _KbdGetShift    endp
  68.     ?debug    L 40
  69. _KbdSetShift    proc    near
  70.     ?debug    B
  71.     push    bp
  72.     mov    bp,sp
  73.     ?debug    C E609536869667453746174040A0400
  74.     ?debug    B
  75.     ?debug    L 45
  76.     mov    ax,word ptr [bp+4]
  77.     mov    bx,64
  78.     mov    es,bx
  79.     mov    bx,23
  80.     mov    word ptr es:[bx],ax
  81. @5:
  82.     ?debug    L 46
  83.     pop    bp
  84.     ret    
  85.     ?debug    C E609536869667453746174040A0400
  86.     ?debug    E
  87.     ?debug    E
  88. _KbdSetShift    endp
  89.     ?debug    L 48
  90. _KbdGetC    proc    near
  91.     ?debug    B
  92.     ?debug    B
  93.     ?debug    L 55
  94.     mov    ah,0
  95.     ?debug    L 56
  96.     int    22
  97.     ?debug    L 57
  98.     jmp    short @6
  99. @6:
  100.     ?debug    L 58
  101.     ret    
  102.     ?debug    E
  103.     ?debug    E
  104. _KbdGetC    endp
  105. _TEXT    ends
  106.     ?debug    C E9
  107. _DATA    segment word public 'DATA'
  108. s@    label    byte
  109. _DATA    ends
  110. _TEXT    segment    byte public 'CODE'
  111. _TEXT    ends
  112.     public    _KbdSetShift
  113.     public    _KbdGetShift
  114.     public    _KbdFlush
  115.     public    _KbdGetC
  116.     ?debug    C EA0109
  117.     ?debug    C E31800000023010000
  118.     ?debug    C EC0C5F4B626453657453686966741818
  119.     ?debug    C E31900000023040000
  120.     ?debug    C EC0C5F4B626447657453686966741900
  121.     ?debug    C E31A00000023010000
  122.     ?debug    C EC095F4B6264466C7573681A00
  123.     ?debug    C E31B00000023040000
  124.     ?debug    C EC085F4B6264476574431B00
  125.     end
  126.